import request from "@/utils/http";

export const getBannersAPI = (distributionSite = 1) => {
  return request({
    url: "/home/banner",
    data: {
      distributionSite,
    },
  });
};

export const getCategoryAPI = () => {
  return request({ url: "/home/category/mutli" });
};

export const getHotsAPI = () => request({ url: "/home/hot/mutli" });

export const getNewGoodsAPI = (limit = 4) => {
  return request({
    url: "/home/new",
    data: {
      limit,
    },
  });
};

export const getLikesAPI = (page = 1, pageSize = 10) => {
  return request({ url: "/home/goods/guessLike", data: { page, pageSize } });
};

export const getRecommendAPI = (url, subType = "", page = 1, pageSize = 10) => {
  return request({
    url,
    data: {
      subType,
      page,
      pageSize,
    },
  });
};
